//
//  ByScoreBillVC.m
//  mijifen_ios
//
//  Created by 朱凯 on 2017/10/24.
//  Copyright © 2017年 itboye. All rights reserved.
//

#import "ByScoreBillVC.h"

// view
#import "ByViewScroeBillListTable.h"            // 积分账单list

@interface ByScoreBillVC ()


@end

@implementation ByScoreBillVC

#pragma mark - view method
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"积分账单";
    
    [self addLeftBackBarButtonItem];
    
    
    [self createViews];
}

#pragma mark - 创建视图
- (void)createViews {
    
    ZKSegmentControl *segment = [[ZKSegmentControl alloc] init];
    segment.segmentsArray = @[@"收入", @"支出"];
    segment.segmentSelectTint = BY_GOLD_COLOR;
    segment.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:segment];
    [segment mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.equalTo(self.view);
        if (@available(ios 11.0,*)) {
            make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
        } else {
            make.bottom.equalTo(self);
        }
    }];
    
    
    segment.dynamicalAddContentViewBlock = ^ (void (^contentViewFetchBlock)(ZKSegmentContentView *contentView), NSInteger index) {
        
        ByViewScroeBillListTable *contentView = [[ByViewScroeBillListTable alloc] init];
        contentView.index = index;
        
        if (contentViewFetchBlock) {
            contentViewFetchBlock(contentView);
        }
    };
    
}




@end
